package ch09;

import java.text.DecimalFormat;

class _46_DecimalFormatEx2 {
	public static void main(String[] args) {
		DecimalFormat df = new DecimalFormat("#,###.##");
		DecimalFormat df2 = new DecimalFormat("#.###E0");

		try {			
			System.out.print("1,234,567.89" + " -> ");			
			Number num = df.parse("1,234,567.89");			
			System.out.print(num.doubleValue() + " -> " + df2.format(num));
		} catch (Exception e) {	}
	}
}
/*
1,234,567.89 -> 1234567.89 -> 1.235E6
*/